package com.xxx.Bz;

/**
 * @version v1.0
 * @Description
 * @Author admin
 * @date 2021/7/20  11:05
 * @Copyright
 */
public class Bzdome01 {
    public static void main(String[] args) {
        /*
         * byte    -- Byte
         * short   -- Short
         * int     -- Integer
         * long    -- Long
         * float   -- Float
         * double  -- Double
         * char    -- Character --->没有parserxxx
         * boolean -- Boolean
         *
         * xxx.parsexxx("xxx类型的数据");
         * */

        //M1();
        Integer i = 6;//自动装箱    Integer i= new Integer(6);
        i= i+1; //自动拆箱  new Integer(i.intValue()+1);
        System.out.println("i = " + i);

        Integer integer = new Integer(100);
        Integer integer1 = new Integer(100);
        System.out.println(integer == integer1);
        System.out.println(integer.equals(integer1));

        Integer i3 = 128;//自动装箱，如果装箱的是一个字节，那么数据会被共享不会被重写创建对象
        Integer i4 = 128;
        System.out.println(i4 =  i3);
        System.out.println( i3.equals(i4));


    }

    private static void M1() {
        System.out.println(Integer.MAX_VALUE);
        Integer integer = new Integer(6);
        System.out.println("integer = " + integer);
        System.out.println(integer.toBinaryString(6));
        System.out.println(integer.toHexString(6));
        System.out.println(integer.toOctalString(6));


        int i = Integer.parseInt("5");
        i +=5;
        System.out.println("i = " + i);
    }
}
